/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Monster;

import com.jme3.asset.AssetManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.Spatial;

/**
 *
 * @author Jake
 */
public class SimpleMonster extends Geometry {
    
    private float xVector;
    private float yVector;
    private float zVector;
    private String name;
    private Integer health;
    private String modelInfo;
    private String theModel;
    private Spatial activeModel;
    
    public SimpleMonster(float xVector, float yVector, float zVector, String name, Integer health, String modelInfo){
        this.xVector = xVector;
        this.yVector = yVector;
        this.zVector = zVector;
        this.name = name;
        this.health = health;
        this.theModel = modelInfo;
   }
    
    public SimpleMonster(String name, Integer health, Spatial modelInfo){
        this.name = name;
        this.health = health;
        this.activeModel = modelInfo;
        this.activeModel.scale(0.05f,0.05f,0.05f);
    }
    
    /**
     * Returns the spatial model to the main program
     * @return 
     */
    public Spatial getModel(){
        return this.activeModel;
    }
    
    public void setSpatial(Spatial activeModel){
        this.activeModel = activeModel;
    }
    
    /**
     * Does the damage calculation and determines if dead
     * @param damage
     *      damage taken from being shot
     * @return 
     */
    public boolean gotShot(Integer damage){
         health -= damage;
         if(health.compareTo(0)<=0){
             return true;
         }
         else{
             return false;
         }
    }
}
